package com.itheima.自习.第一次.第十九题;
/*
定义测试类，使用Perosn对象调用keepPet方法，实现运行结果
*/
public class Demo19 {
    public static void main(String[] args) {
        Person person1 = new Person("老王",30);
        person1.keepPet(new Dog(2,"黑"),"骨头");

        Person person2 = new Person("老李",25);
        person2.keepPet(new Cat(3,"灰"),"鱼");
    }
}


